package com.dycong.common.function;

import java.util.function.Function;

/**
 * Created by yu on 15-7-10.
 */
public interface ThrewFunction<T, R> extends Function<T, R> {

    R threwApply(T t) throws Throwable;

    @Override
    default R apply(T t){
        try{
            return threwApply(t);
        }catch (Throwable e){
            throw new RuntimeException(e);
        }
    }
}
